﻿using System.Diagnostics;
using System.Runtime.CompilerServices;

namespace Innoapps.FileTransfer.Helpers
{
    class RuntimeHelper
    {
        /// <summary>
        /// Returns the fully qualified name of the currently running method
        /// </summary>
        /// <returns></returns>
        [MethodImpl(MethodImplOptions.NoInlining)]
        public string GetCurrentMethod()
        {
            StackTrace st = new StackTrace();
            StackFrame sf = st.GetFrame(1);

            return sf.GetMethod().Name;
        }
    }
}
